package com.dems.service;


import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dems.dao.dataobject.User;
import com.dems.domain.*;
import com.dems.domain.org.DeptStaffDto;
import com.dems.domain.user.UserBasicMessageVO;
import com.dems.domain.user.UserDto;
import com.dems.domain.user.UserHomeDto;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

/**
 * 用户服务
 */
public interface IUserService {

    JSONObject getPartner(ReqBaseVO reqBaseVO);

    void sendVcode(BindPartnerReqVO bindPartnerReqVO) throws Exception;

    /**
     * 分销用户
     */
    List<String> subOpenIds(String openId, List<String> partnerCode, int level);

    void modifyPwd(User user, ModifyPasswordReqVO modifyPasswordReqVO);

    Page<UserVO> fetchUserList(User user, UserReqVO userReqVO) throws InvocationTargetException, IllegalAccessException;

    Page<DeptStaffDto> fetchUserListV2(User user, UserReqVO userReqVO) throws InvocationTargetException, IllegalAccessException;

    Page<DeptStaffDto> fetchAllUserList(UserReqVO userReqVO);

    void downLoadPartnerListV2(User user, UserReqVO userReqVO) throws InvocationTargetException, IllegalAccessException;
    User fetchUser(String openId);

    /**
     * 修改用户类型，坐席
     * @param user
     * @param userReqVO
     * @return
     */
    User modifyUserType(User user, UserReqVO userReqVO);

    /**
     * 用户离职修改
     * @param user
     * @param userReqVO
     * @return
     */
    User fireUser(User user, UserReqVO userReqVO);

    User deactivateUser(User user, UserReqVO userReqVO);

    int saveSipInfo(UserReqVO userReqVO, User loanassistUser);

    JSONObject sendUserInfo(UserReqVO userReqVO, User loanassistUser);

    List<String> fetchRoleCodeList(ReqBaseVO reqBaseVO);

    User addUser(UserReqVO userReqVO, User loanassistUser);

    /**
     * 修改用户头像数据
     *
     * @param userBasicMessageVO 用户基本信息
     * */
    String updateBasicMessage(UserBasicMessageVO userBasicMessageVO);

    Integer clearSipInfo(UserReqVO userReqVO);

    /**
     * 重置用户密码
     * */
    void resetPwd(ModifyPasswordReqVO modifyPasswordReqVO);

    Integer updateBuId(User user, String userId, Integer buId);

    /**
     * 删除用户
     * */
    Integer updateUser(User user, UserReqVO userReqVO);

    /**
     * 根据用户ID查询用户信息
     * */
    UserDto findUserById(UserReqVO userReqVO);
}
